# $ID$
# Maintainer: Rémy Oudompheng <remy@archlinux.org>

pkgname=perl-lingua-translit
_dist=Lingua-Translit
pkgver=0.27
pkgrel=3
pkgdesc="Transliteration of text between writing systems"
arch=('any')
url="https://metacpan.org/release/${_dist}"
license=('PerlArtistic' 'GPL')
depends=('perl')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/A/AL/ALINKE/${_dist}-${pkgver}.tar.gz)
md5sums=('e95386614b65b32a8ed9c1a24ae110f8')
sha512sums=('a42aa61cc5e08d0358a7f5b72b5bf2a10938124ae49e693c6720ef8793b5afe653cc13cc4e7f3132427d3e9a0b87c6e95f7e083b23c044f478c43ac6bae7d2ba')

build() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
